<?php
# common PDO-based functions

function genie_connect()
{
	try 
	{
		$dbh = new PDO("mysql:host=localhost;dbname=itunes_stats", "root", "blahblahblah");
		$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	} catch  (PDOException $e) {
		print ($e);
		print "Unable to connect to database";
	}
	return ($dbh);
}

?>
